package com.hikw.configuration;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @Description: web配置
 * @ClassNmae: WebConfiguration
 * @Author: 何同学
 * @DateTime: 2022-02-18 17:02
 **/
@Configuration
public class WebConfiguration implements WebMvcConfigurer {


    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        //解决无法访问static目录下的资源
        registry.addResourceHandler("/static/**").addResourceLocations("classpath:/static/");
    }

}
